/*
 * Copyright 2010 Thedwick, LLC

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

 */
package com.thedwick.jdbcGrabber.statement;

import java.io.InputStream;
import java.io.Reader;
import java.math.BigDecimal;
import java.net.URL;
import java.sql.Array;
import java.sql.Blob;
import java.sql.CallableStatement;
import java.sql.Clob;
import java.sql.Date;
import java.sql.NClob;
import java.sql.Ref;
import java.sql.RowId;
import java.sql.SQLException;
import java.sql.SQLXML;
import java.sql.Time;
import java.sql.Timestamp;
import java.util.Calendar;
import java.util.Map;

import com.thedwick.jdbcGrabber.sink.SQLSink;

public class gbCallableStatement extends gbPreparedStatement implements CallableStatement {

	public gbCallableStatement(CallableStatement underlying, SQLSink sink, String sql){
		super(underlying, sink, sql);
	}
	
	@Override
	public CallableStatement getUnderlying(){
		return (CallableStatement) super.getUnderlying();
	}
	
	@Override
	public Array getArray(int parameterIndex) throws SQLException {

		return getUnderlying().getArray(parameterIndex);
	}

	@Override
	public Array getArray(String parameterName) throws SQLException {

		return getUnderlying().getArray(parameterName);
	}

	@Override
	public BigDecimal getBigDecimal(int parameterIndex) throws SQLException {

		return getUnderlying().getBigDecimal(parameterIndex);
	}

	@Override
	public BigDecimal getBigDecimal(String parameterName) throws SQLException {

		return getUnderlying().getBigDecimal(parameterName);
	}

	@Override
	public BigDecimal getBigDecimal(int parameterIndex, int scale)
			throws SQLException {

		return getUnderlying().getBigDecimal(parameterIndex, scale);
	}

	@Override
	public Blob getBlob(int parameterIndex) throws SQLException {

		return getUnderlying().getBlob(parameterIndex);
	}

	@Override
	public Blob getBlob(String parameterName) throws SQLException {

		return getUnderlying().getBlob(parameterName);
	}

	@Override
	public boolean getBoolean(int parameterIndex) throws SQLException {

		return getUnderlying().getBoolean(parameterIndex);
	}

	@Override
	public boolean getBoolean(String parameterName) throws SQLException {

		return getUnderlying().getBoolean(parameterName);
	}

	@Override
	public byte getByte(int parameterIndex) throws SQLException {

		return getUnderlying().getByte(parameterIndex);
	}

	@Override
	public byte getByte(String parameterName) throws SQLException {

		return getUnderlying().getByte(parameterName);
	}

	@Override
	public byte[] getBytes(int parameterIndex) throws SQLException {

		return getUnderlying().getBytes(parameterIndex);
	}

	@Override
	public byte[] getBytes(String parameterName) throws SQLException {

		return getUnderlying().getBytes(parameterName);
	}

	@Override
	public Reader getCharacterStream(int parameterIndex) throws SQLException {

		return getUnderlying().getCharacterStream(parameterIndex);
	}

	@Override
	public Reader getCharacterStream(String parameterName) throws SQLException {

		return getUnderlying().getCharacterStream(parameterName);
	}

	@Override
	public Clob getClob(int parameterIndex) throws SQLException {

		return getUnderlying().getClob(parameterIndex);
	}

	@Override
	public Clob getClob(String parameterName) throws SQLException {

		return getUnderlying().getClob(parameterName);
	}

	@Override
	public Date getDate(int parameterIndex) throws SQLException {

		return getUnderlying().getDate(parameterIndex);
	}

	@Override
	public Date getDate(String parameterName) throws SQLException {

		return getUnderlying().getDate(parameterName);
	}

	@Override
	public Date getDate(int parameterIndex, Calendar cal) throws SQLException {

		return getUnderlying().getDate(parameterIndex, cal);
	}

	@Override
	public Date getDate(String parameterName, Calendar cal) throws SQLException {

		return getUnderlying().getDate(parameterName, cal);
	}

	@Override
	public double getDouble(int parameterIndex) throws SQLException {

		return getUnderlying().getDouble(parameterIndex);
	}

	@Override
	public double getDouble(String parameterName) throws SQLException {

		return getUnderlying().getDouble(parameterName);
	}

	@Override
	public float getFloat(int parameterIndex) throws SQLException {

		return getUnderlying().getFloat(parameterIndex);
	}

	@Override
	public float getFloat(String parameterName) throws SQLException {

		return getUnderlying().getFloat(parameterName);
	}

	@Override
	public int getInt(int parameterIndex) throws SQLException {

		return getUnderlying().getInt(parameterIndex);
	}

	@Override
	public int getInt(String parameterName) throws SQLException {

		return getUnderlying().getInt(parameterName);
	}

	@Override
	public long getLong(int parameterIndex) throws SQLException {

		return getUnderlying().getLong(parameterIndex);
	}

	@Override
	public long getLong(String parameterName) throws SQLException {

		return getUnderlying().getLong(parameterName);
	}

	@Override
	public Reader getNCharacterStream(int parameterIndex) throws SQLException {

		return getUnderlying().getNCharacterStream(parameterIndex);
	}

	@Override
	public Reader getNCharacterStream(String parameterName) throws SQLException {

		return getUnderlying().getNCharacterStream(parameterName);
	}

	@Override
	public NClob getNClob(int parameterIndex) throws SQLException {

		return getUnderlying().getNClob(parameterIndex);
	}

	@Override
	public NClob getNClob(String parameterName) throws SQLException {

		return getUnderlying().getNClob(parameterName);
	}

	@Override
	public String getNString(int parameterIndex) throws SQLException {

		return getUnderlying().getNString(parameterIndex);
	}

	@Override
	public String getNString(String parameterName) throws SQLException {

		return getUnderlying().getNString(parameterName);
	}

	@Override
	public Object getObject(int parameterIndex) throws SQLException {

		return getUnderlying().getObject(parameterIndex);
	}

	@Override
	public Object getObject(String parameterName) throws SQLException {

		return getUnderlying().getObject(parameterName);
	}

	@Override
	public Object getObject(int parameterIndex, Map<String, Class<?>> map)
			throws SQLException {

		return getUnderlying().getObject(parameterIndex, map);
	}

	@Override
	public Object getObject(String parameterName, Map<String, Class<?>> map)
			throws SQLException {

		return getUnderlying().getObject(parameterName, map);
	}

	@Override
	public Ref getRef(int parameterIndex) throws SQLException {

		return getUnderlying().getRef(parameterIndex);
	}

	@Override
	public Ref getRef(String parameterName) throws SQLException {

		return getUnderlying().getRef(parameterName);
	}

	@Override
	public RowId getRowId(int parameterIndex) throws SQLException {

		return getUnderlying().getRowId(parameterIndex);
	}

	@Override
	public RowId getRowId(String parameterName) throws SQLException {

		return getUnderlying().getRowId(parameterName);
	}

	@Override
	public SQLXML getSQLXML(int parameterIndex) throws SQLException {

		return getUnderlying().getSQLXML(parameterIndex);
	}

	@Override
	public SQLXML getSQLXML(String parameterName) throws SQLException {

		return getUnderlying().getSQLXML(parameterName);
	}

	@Override
	public short getShort(int parameterIndex) throws SQLException {

		return getUnderlying().getShort(parameterIndex);
	}

	@Override
	public short getShort(String parameterName) throws SQLException {

		return getUnderlying().getShort(parameterName);
	}

	@Override
	public String getString(int parameterIndex) throws SQLException {

		return getUnderlying().getString(parameterIndex);
	}

	@Override
	public String getString(String parameterName) throws SQLException {

		return getUnderlying().getString(parameterName);
	}

	@Override
	public Time getTime(int parameterIndex) throws SQLException {

		return getUnderlying().getTime(parameterIndex);
	}

	@Override
	public Time getTime(String parameterName) throws SQLException {

		return getUnderlying().getTime(parameterName);
	}

	@Override
	public Time getTime(int parameterIndex, Calendar cal) throws SQLException {

		return getUnderlying().getTime(parameterIndex, cal);
	}

	@Override
	public Time getTime(String parameterName, Calendar cal) throws SQLException {

		return getUnderlying().getTime(parameterName, cal);
	}

	@Override
	public Timestamp getTimestamp(int parameterIndex) throws SQLException {

		return getUnderlying().getTimestamp(parameterIndex);
	}

	@Override
	public Timestamp getTimestamp(String parameterName) throws SQLException {

		return getUnderlying().getTimestamp(parameterName);
	}

	@Override
	public Timestamp getTimestamp(int parameterIndex, Calendar cal)
			throws SQLException {

		return getUnderlying().getTimestamp(parameterIndex, cal);
	}

	@Override
	public Timestamp getTimestamp(String parameterName, Calendar cal)
			throws SQLException {

		return getUnderlying().getTimestamp(parameterName, cal);
	}

	@Override
	public URL getURL(int parameterIndex) throws SQLException {

		return getUnderlying().getURL(parameterIndex);
	}

	@Override
	public URL getURL(String parameterName) throws SQLException {

		return getUnderlying().getURL(parameterName);
	}

	@Override
	public void registerOutParameter(int parameterIndex, int sqlType)
			throws SQLException {

		getUnderlying().registerOutParameter(parameterIndex, sqlType);
	}

	@Override
	public void registerOutParameter(String parameterName, int sqlType)
			throws SQLException {

		getUnderlying().registerOutParameter(parameterName, sqlType);
	}

	@Override
	public void registerOutParameter(int parameterIndex, int sqlType, int scale)
			throws SQLException {

		getUnderlying().registerOutParameter(parameterIndex, sqlType, scale);		
	}

	@Override
	public void registerOutParameter(int parameterIndex, int sqlType,
			String typeName) throws SQLException {

		getUnderlying().registerOutParameter(parameterIndex, sqlType, typeName);		
	}

	@Override
	public void registerOutParameter(String parameterName, int sqlType,
			int scale) throws SQLException {

		getUnderlying().registerOutParameter(parameterName, sqlType, scale);		
	}

	@Override
	public void registerOutParameter(String parameterName, int sqlType,
			String typeName) throws SQLException {

		getUnderlying().registerOutParameter(parameterName, sqlType, typeName);		
	}

	@Override
	public void setAsciiStream(String parameterName, InputStream x)
			throws SQLException {

		getUnderlying().setAsciiStream(parameterName, x);		
	}

	@Override
	public void setAsciiStream(String parameterName, InputStream x, int length)
			throws SQLException {

		getUnderlying().setAsciiStream(parameterName, x, length);
	}

	@Override
	public void setAsciiStream(String parameterName, InputStream x, long length)
			throws SQLException {

		getUnderlying().setAsciiStream(parameterName, x, length);	
	}

	@Override
	public void setBigDecimal(String parameterName, BigDecimal x)
			throws SQLException {

		getUnderlying().setBigDecimal(parameterName, x);	
	}

	@Override
	public void setBinaryStream(String parameterName, InputStream x)
			throws SQLException {

		getUnderlying().setBinaryStream(parameterName, x);
	}

	@Override
	public void setBinaryStream(String parameterName, InputStream x, int length)
			throws SQLException {

		getUnderlying().setBinaryStream(parameterName, x, length);	
	}

	@Override
	public void setBinaryStream(String parameterName, InputStream x, long length)
			throws SQLException {

		getUnderlying().setBinaryStream(parameterName, x, length);
	}

	@Override
	public void setBlob(String parameterName, Blob x) throws SQLException {

		getUnderlying().setBlob(parameterName, x);		
	}

	@Override
	public void setBlob(String parameterName, InputStream inputStream)
			throws SQLException {

		getUnderlying().setBlob(parameterName, inputStream);		
	}

	@Override
	public void setBlob(String parameterName, InputStream inputStream,
			long length) throws SQLException {

		getUnderlying().setBlob(parameterName, inputStream, length);		
	}

	@Override
	public void setBoolean(String parameterName, boolean x) throws SQLException {

		getUnderlying().setBoolean(parameterName, x);
	}

	@Override
	public void setByte(String parameterName, byte x) throws SQLException {

		getUnderlying().setByte(parameterName, x);
	}

	@Override
	public void setBytes(String parameterName, byte[] x) throws SQLException {

		getUnderlying().setBytes(parameterName, x);
	}

	@Override
	public void setCharacterStream(String parameterName, Reader reader)
			throws SQLException {

		getUnderlying().setCharacterStream(parameterName, reader);	
	}

	@Override
	public void setCharacterStream(String parameterName, Reader reader,
			int length) throws SQLException {

		getUnderlying().setCharacterStream(parameterName, reader, length);
	}

	@Override
	public void setCharacterStream(String parameterName, Reader reader,
			long length) throws SQLException {

		getUnderlying().setCharacterStream(parameterName, reader, length);
	}

	@Override
	public void setClob(String parameterName, Clob x) throws SQLException {

		getUnderlying().setClob(parameterName, x);
	}

	@Override
	public void setClob(String parameterName, Reader reader)
			throws SQLException {

		getUnderlying().setClob(parameterName, reader);
	}

	@Override
	public void setClob(String parameterName, Reader reader, long length)
			throws SQLException {

		getUnderlying().setClob(parameterName, reader, length);
	}

	@Override
	public void setDate(String parameterName, Date x) throws SQLException {

		getUnderlying().setDate(parameterName, x);
	}

	@Override
	public void setDate(String parameterName, Date x, Calendar cal)
			throws SQLException {

		getUnderlying().setDate(parameterName, x, cal);
	}

	@Override
	public void setDouble(String parameterName, double x) throws SQLException {

		getUnderlying().setDouble(parameterName, x);
	}

	@Override
	public void setFloat(String parameterName, float x) throws SQLException {

		getUnderlying().setFloat(parameterName, x);
	}

	@Override
	public void setInt(String parameterName, int x) throws SQLException {

		getUnderlying().setInt(parameterName, x);
	}

	@Override
	public void setLong(String parameterName, long x) throws SQLException {

		getUnderlying().setLong(parameterName, x);
	}

	@Override
	public void setNCharacterStream(String parameterName, Reader value)
			throws SQLException {

		getUnderlying().setNCharacterStream(parameterName, value);	
	}

	@Override
	public void setNCharacterStream(String parameterName, Reader value,
			long length) throws SQLException {

		getUnderlying().setNCharacterStream(parameterName, value);
	}

	@Override
	public void setNClob(String parameterName, NClob value) throws SQLException {

		getUnderlying().setNClob(parameterName, value);
	}

	@Override
	public void setNClob(String parameterName, Reader reader)
			throws SQLException {

		getUnderlying().setNClob(parameterName, reader);
	}

	@Override
	public void setNClob(String parameterName, Reader reader, long length)
			throws SQLException {

		getUnderlying().setNClob(parameterName, reader, length);	
	}

	@Override
	public void setNString(String parameterName, String value)
			throws SQLException {

		getUnderlying().setNString(parameterName, value);	
	}

	@Override
	public void setNull(String parameterName, int sqlType) throws SQLException {

		getUnderlying().setNull(parameterName, sqlType);	
	}

	@Override
	public void setNull(String parameterName, int sqlType, String typeName)
			throws SQLException {

		getUnderlying().setNull(parameterName, sqlType, typeName);	
	}

	@Override
	public void setObject(String parameterName, Object x) throws SQLException {

		getUnderlying().setObject(parameterName, x);	
	}

	@Override
	public void setObject(String parameterName, Object x, int targetSqlType)
			throws SQLException {

		getUnderlying().setObject(parameterName,x,targetSqlType);	
	}

	@Override
	public void setObject(String parameterName, Object x, int targetSqlType,
			int scale) throws SQLException {

		getUnderlying().setObject(parameterName, x, targetSqlType, scale);	
	}

	@Override
	public void setRowId(String parameterName, RowId x) throws SQLException {

		getUnderlying().setRowId(parameterName, x);	
	}

	@Override
	public void setSQLXML(String parameterName, SQLXML xmlObject)
			throws SQLException {

		getUnderlying().setSQLXML(parameterName, xmlObject);	
	}

	@Override
	public void setShort(String parameterName, short x) throws SQLException {

		getUnderlying().setShort(parameterName, x);	
	}

	@Override
	public void setString(String parameterName, String x) throws SQLException {

		getUnderlying().setString(parameterName, x);	
	}

	@Override
	public void setTime(String parameterName, Time x) throws SQLException {

		getUnderlying().setTime(parameterName, x);	
	}

	@Override
	public void setTime(String parameterName, Time x, Calendar cal)
			throws SQLException {

		getUnderlying().setTime(parameterName, x, cal);	
	}

	@Override
	public void setTimestamp(String parameterName, Timestamp x)
			throws SQLException {

		getUnderlying().setTimestamp(parameterName, x);	
	}

	@Override
	public void setTimestamp(String parameterName, Timestamp x, Calendar cal)
			throws SQLException {

		getUnderlying().setTimestamp(parameterName, x, cal);	
	}

	@Override
	public void setURL(String parameterName, URL val) throws SQLException {

		getUnderlying().setURL(parameterName, val);	
	}

	@Override
	public boolean wasNull() throws SQLException {

		return getUnderlying().wasNull();
	}
}
